{% extends "EMNewsBundle::layout.html.twig" %}
{% block title 'News - All comments' %}
{% block middlenav%}
<div class="middleNav">
    	<ul>
        	<li class="iNew"><a href="{{ path('em_comments') }}" title=""><span>Add New</span></a></li>
		</ul>
    </div>
{% endblock%}

{% block content %}
	<div class="title"><h5> Lastest Comments</h5></div>
	<!-- Latest orders -->
                <div class="widget">
                    <div class="head"><h5 class="iBubbles">Comments </h5><div class="num"><a href="#" class="greenNum">+245</a></div></div>
					{% for key, comment in comments %}
                    <div class="supTicket">
                    	<div class="issueType">
                        	<span class="issueInfo">From {{comment.name}} [ {{comment.email}}] on <a href="#" title="">{{comment.new.title}}</a>, {{comment.date | date ('m/d/Y')}}</span>
                            <span class="issueNum"><a href="#" title="">[ #{{key+1}} ]</a></span>
                            <div class="fix"></div>
                        </div>
                        
                        <div class="issueSummary">
                       		<a href="#" title="" class="floatleft"><img src="{{asset('bundles/news/images/user.png')}}" alt="" /></a>	
                            <div class="ticketInfo">
                            	<ul>
                                	<li>{{comment.name}} wrote:</li>
                                    <li class="even"><strong class="green">[ {% if comment.status=='A' %} Approved  {% elseif comment.status=='P' %} Pending {% endif%}]</strong></li>
                                    <li>{{comment.comment}}</li>
                                    <li class="even">
									<a href="{{ path('em_comments_edit',{'id': comment.id,'status':'A'}) }}" ><img src="{{asset('bundles/news/images/icons/color/tick.png')}}" alt=""></a> &nbsp;
									<a href="{{ path('em_comments_edit',{'id': comment.id,'status':'D'}) }}" ><img src="{{asset('bundles/news/images/icons/color/cross.png')}}"  alt=""></a> &nbsp;
									</li>
                                </ul>
                                <div class="fix"></div>
                            </div>
                            <div class="fix"></div>
                        </div> 
                    </div>
					{% endfor %}
                    
                                      
                </div>
</div>
</div>
</div

			
{% endblock %}		